package com.neuedu.grainsapi.controller;

import com.neuedu.grainsapi.pojo.GrainRank;
import com.neuedu.grainsapi.service.GrainRankService;
import com.neuedu.grainsapi.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GrainRankController {
    @Autowired
    private GrainRankService grainRankService;
    @GetMapping("/queryAGR")
    public ResponseResult<List<GrainRank>> queryAGR(){
        List<GrainRank> grainRanks = grainRankService.queryAGR();
        return new ResponseResult<>("200","yes",grainRanks);
    }
}
